<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>爱你钟英</title>
	<style type="text/css">
		@font-face {
			font-family: digit;
			src: url('../digital-7_mono.ttf') format("truetype");
		}
    html, body {
      height: 100%;
      padding: 0;
      margin: 0;
      background: #000;
      overflow: hidden;
    }
    #words{
      position:absolute;
      top: 36%;
    }
    canvas {
      position: absolute;
      width: 100%;
      height: 100%;
      left: 240px;
    }
	</style>
	<link href="../css/default.css" type="text/css" rel="stylesheet">
	<script type="text/javascript" src="../js/jquery.js"></script>
  <script type="text/javascript" src="code.js"></script>
</head>

<body style="background-color: #000000;">
  <canvas id="pinkboard"></canvas>
	<div></div>
	<div id="mainDiv">
		<div id="content">
			<div id="code" style="width:540px;">
				<span class="comments">/**</span><br />
				<span class="space"/><span class="comments">* We watched the loveCode on《点燃我，温暖你》,</span><br />
				<span class="space"/><span class="comments">* so I write some code to express love .</span><br />
				<span class="space"/><span class="comments">*/</span><br />
				Boy i = <span class="keyword">new</span> Boy(<span class="string">"王路路"</span>);<br />
				Girl u = <span class="keyword">new</span> Girl(<span class="string">"钟英"</span>);<br />
				<span class="comments">// Juny 18, 2021, I told you I love you. </span><br />
				i.love(u);<br />
				<span class="comments">// Luckily, you accepted and became my girlfriend eversince.</span><br />
				u.accepted();<br />
				<span class="comments">// Since then, I miss u every day.</span><br />
				i.miss(u);<br />
				<span class="comments">// And take care of u and our love.</span><br />
				i.takeCareOf(u);<br />
				<span class="comments">// You say that you won't be so easy to marry me.</span><br />
				<span class="comments">// So I keep waiting and I have confidence that you will.</span><br />
				<span class="keyword">boolean</span> isHesitate = <span class="keyword">true</span>;<br />
				<span class="keyword">while</span> (isHesitate) {<br />
				<span class="placeholder"/>i.waitFor(u);<br />
				<span class="placeholder"/><span class="comments">// I think it is an important decision</span><br />
				<span class="placeholder"/><span class="comments">// and you should think it over.</span><br />
				<span class="placeholder"/>isHesitate = u.thinkOver();<br />
				}<br />
				<span class="comments">// After a romantic wedding, we will live happily ever after.</span><br />
				i.marry(u);<br />
				i.liveHappilyWith(u);<br />
			</div>
			<div id="loveHeart"  style="width:570px;height: 100%;">
				<div id="words">
					<div id="messages">
						YING, I have fallen in love with you for
						<div id="elapseClock"></div>
					</div>
					<div id="loveu">
						Love u forever and ever.<br/>
						<div class="signature">- LuLu</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript">
		var offsetX = $("#loveHeart").width() / 2;
		var offsetY = $("#loveHeart").height() / 2 - 55;
		var together = new Date();
		together.setFullYear(2021, 05, 18);
		together.setHours(15);
		together.setMinutes(40);
		together.setSeconds(0);
		together.setMilliseconds(0);
		
		if (!document.createElement('canvas').getContext) {
			var msg = document.createElement("div");
			msg.id = "errorMsg";
			msg.innerHTML = "Your browser doesn't support HTML5!<br/>Recommend use Chrome 14+/IE 9+/Firefox 7+/Safari 4+"; 
			document.body.appendChild(msg);
			$("#code").css("display", "none")
			$("#copyright").css("position", "absolute");
			$("#copyright").css("bottom", "10px");
		    document.execCommand("stop");
		} else {
			setInterval(function () {
    			showMessages()
			}, 1000);
			setInterval(function () {
				timeElapse(together);
			}, 1000);

			$("#code").typewriter();
		}
		

	</script>
  <script type="text/javascript" src="heart.js"></script>
</body>
</html>
